| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Static Public Member Functions | List of all members
nkAstraeus::nkScriptsWrap::CompilationResultWrapper Class Referencefinal

Wraps a nkScripts::CompilationResult and offers capabilities to use it in scripts. More...

## Static Public Member Functions
static void | updateEnvironment (nkScripts::Environment *env)
static void * | constructor (const nkScripts::DataStack &stack)
static void | destructor (void *toDestroy)
static nkScripts::OutputValue | getFailureMessage (void *data)
static nkScripts::OutputValue | getFailureType (void *data)
static nkScripts::OutputValue | getSuccess (void *data)
static void | setFailureMessage (const nkScripts::DataStack &stack)
static void | setFailureType (const nkScripts::DataStack &stack)
static void | setSuccess (const nkScripts::DataStack &stack)

## Detailed Description

Wraps a nkScripts::CompilationResult and offers capabilities to use it in scripts.

## Member Function Documentation

## ◆ updateEnvironment()

static void nkAstraeus::nkScriptsWrap::CompilationResultWrapper::updateEnvironment | ( | nkScripts::Environment * | env | ) |
| static

Updates a given environment and set it up to use all functions wrapped by this wrapper.

Parameters

  env | The environment to set up.

## ◆ constructor()

static void* nkAstraeus::nkScriptsWrap::CompilationResultWrapper::constructor | ( | const nkScripts::DataStack & | stack | ) |
| static

Wrapper function for the constructor of the user type.

local r = nkScripts.CompilationResult.new() ;

Parameters

  stack | The parameter stack.

Returns
  An output value with the user type and data allocated.

## ◆ destructor()

static void nkAstraeus::nkScriptsWrap::CompilationResultWrapper::destructor | ( | void * | toDestroy | ) |
| static

Wrapper function for the destructor of the user type.

Parameters

  toDestroy | The data that has to be freed.

## ◆ getFailureMessage()

static nkScripts::OutputValue nkAstraeus::nkScriptsWrap::CompilationResultWrapper::getFailureMessage | ( | void * | data | ) |
| static

Wrapper function for nkScripts::CompilationResult::_failureMessage, exposed as an attribute getter.

local m = r._failureMessage ;

Parameters

  data | The data from which the attribute will be retrieved.

Returns
  The attribute value, as a string.

## ◆ getFailureType()

static nkScripts::OutputValue nkAstraeus::nkScriptsWrap::CompilationResultWrapper::getFailureType | ( | void * | data | ) |
| static

Wrapper function for nkScripts::CompilationResult::_failureType, exposed as an attribute getter.

local t = r._failureType ;

Parameters

  data | The data from which the attribute will be retrieved.

Returns
  The attribute value, as a nkScripts::COMPILATION_FAILURE_TYPE.

## ◆ getSuccess()

static nkScripts::OutputValue nkAstraeus::nkScriptsWrap::CompilationResultWrapper::getSuccess | ( | void * | data | ) |
| static

Wrapper function for nkScripts::CompilationResult::_success, exposed as an attribute getter.

local m = r._success ;

Parameters

  data | The data from which the attribute will be retrieved.

Returns
  The attribute value, as a bool.

## ◆ setFailureMessage()

static void nkAstraeus::nkScriptsWrap::CompilationResultWrapper::setFailureMessage | ( | const nkScripts::DataStack & | stack | ) |
| static

Wrapper function for nkScripts::CompilationResult::_failureMessage, exposed as an attribute setter.

r._failureMessage = 'Failed to parse sources' ;

Parameters

  stack | The parameter stack.

## ◆ setFailureType()

static void nkAstraeus::nkScriptsWrap::CompilationResultWrapper::setFailureType | ( | const nkScripts::DataStack & | stack | ) |
| static

Wrapper function for nkScripts::CompilationResult::_failureType, exposed as an attribute setter.

r._failureType = nkScripts.COMPILATION_FAILURE_TYPE.SYNTAX ;

Parameters

  stack | The parameter stack.

## ◆ setSuccess()

static void nkAstraeus::nkScriptsWrap::CompilationResultWrapper::setSuccess | ( | const nkScripts::DataStack & | stack | ) |
| static

Wrapper function for nkScripts::CompilationResult::_success, exposed as an attribute setter.

r._success = true ;

Parameters

  stack | The parameter stack.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsAstraeus/Scripts/nkScriptsWrap/Scripts/CompilationResultWrapper.h